package com.example.scheduled;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Project:spring-boot-scheduled
 * <p>
 * Title:SchedulerTask2.java
 * <p>
 * Description:
 * <p>
 * Copyrigth:Jiang Software LTD.co Copyright (c) 2021
 * <p>
 * 
 * @version 1.0
 * @since 1.8
 * @author jiang
 * @history 2021 jiang create
 */
@Component
public class SchedulerTask2 {

	private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");

	@Scheduled(fixedRate = 6000)
	public void reportCurrentTime() {
		System.out.println("SchedulerTask2 现在时间：" + dateFormat.format(new Date()));
	}

}
